How to work with update and delete apis in codeigniter